home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_01_04
/
1n04014a
< prev
next >
Wrap
Text File
|
1990-08-05
|
699b
|
39 lines
#include "filesrch.h"
#include "stdio.h"
#include "string.h"
void print_file(char * dir, FILE_DATA * f);
int main(int argc, char * argv [])
{
int i;
if (argc < 2)
{
puts("\ausage: whereis filespec [filespec2]\
[filespec3] [...]");
return 1;
}
for (i = 1; i < argc; ++i)
{
TreeFind(argv[i],0,"\\",print_file);
}
return 0;
}
void print_file(char * dir, FILE_DATA * f)
{
char filename[128];
strcpy(filename,dir);
if (filename[strlen(filename) - 1] != '\\')
strcat(filename,"\\");
strcat(filename,f->name);
puts(filename);
}